#定义一个没有方法，没有属性的类：A
A=type("A",(),{})

#打印A
print(A)
#打印A的实例
print(A())

print("*"*30)

#定义一个带两个属性的类：B
B=type("B",(),{"name":"mark","age":18})
print(B.name)
print(B.age)

print("*"*30)

#定义一个带普通方法的类：C
def test_for_c(self):
    print(self.name)
C=type("C",(),{"name":"mark","age":18,"test_for_c":test_for_c})
c=C()
c.test_for_c()

print("*"*30)

#添加静态方法
@staticmethod
def static_method_test():
    print("static method test")
D=type("D",(),{"name":"mark","age":18,"static_method_test":static_method_test})
D.static_method_test()


print("*"*30)
#添加类方法
@classmethod
def class_method_test(cls):
    print(cls.name)
E=type("E",(),{"name":"mark","age":18,"class_method_test":class_method_test})
e=E()
e.class_method_test()
E.class_method_test()



